package com.song.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.sql.DataSource;
import java.sql.*;

/**
 * 事务测试
 */
@Service(value = "TaskService")
public class TaskService {


    public void tranFather(){
        System.out.println("tranFather");
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
        MaraTempService proxy = context.getBean(MaraTempService.class);
        proxy.maraTempInsert();
    }




}
